<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"/>
    <title>用户</title>
    <link rel="icon" href="../static/favicon.ico" type="image/ico">
    <link href="../static/css/bootstrap.min.css" rel="stylesheet">
    <link href="../static/css/materialdesignicons.min.css" rel="stylesheet">
    <link href="../static/css/style.min.css" rel="stylesheet">
    <script type="text/javascript" src="../static/js/jquery.min.js"></script>
</head>

<body>
<div class="lyear-layout-web">
    <div class="lyear-layout-container">
        <!--左侧导航-->
        <aside class="lyear-layout-sidebar">

            <!-- logo -->
            <div id="logo" class="sidebar-header">
                <a href="index.html"><img src="../static/images/logo-sidebar.png" title="LightYear" alt="LightYear"/></a>
            </div>
            <div class="lyear-layout-sidebar-scroll">

                <nav class="sidebar-main">
                    <ul class="nav nav-drawer">
                        <li class="nav-item active"><a href="index.html"><i class="mdi mdi-home"></i> 后台首页</a></li>
                        <li class="nav-item nav-item-has-subnav">
                            <a href="javascript:void(0)"><i class="mdi mdi-parking"></i> 停车场</a>
                            <ul class="nav nav-subnav">
                                <li><a href="parking.html">停车情况</a></li>
                                <li><a href="record.html">历史记录</a></li>
                            </ul>
                        </li>
                        <li class="nav-item nav-item-has-subnav">
                            <a href="javascript:void(0)"><i class="mdi mdi-account"></i> 用户</a>
                            <ul class="nav nav-subnav">
                                <li><a href="member.html">用户管理</a></li>
                                <li><a href="member_record.html">用户消费记录</a></li>
                                <li><a href="member_recharge.html">用户充值记录</a></li>
                            </ul>
                        </li>
                        <li class="nav-item active">
                            <a href="blacklist.html"><i class="mdi mdi-format-align-justify"></i>黑名单</a>
                        </li>
                    </ul>
                </nav>

                <div class="sidebar-footer">
                    <p class="copyright">Copyright &copy; 2020. Group 14 All rights reserved.</p>
                </div>
            </div>

        </aside>
        <!--End 左侧导航-->

        <!--头部信息-->
        <header class="lyear-layout-header">

            <nav class="navbar navbar-default">
                <div class="topbar">

                    <div class="topbar-left">
                        <div class="lyear-aside-toggler">
                            <span class="lyear-toggler-bar"></span>
                            <span class="lyear-toggler-bar"></span>
                            <span class="lyear-toggler-bar"></span>
                        </div>
                        <span class="navbar-page-title"> 用户 </span>
                    </div>

                    <ul class="topbar-right">
                        <li class="dropdown dropdown-profile">
                            <a href="javascript:void(0)" data-toggle="dropdown">
                                <img class="img-avatar img-avatar-48 m-r-10" src="../static/images/users/logo.jpeg" alt="停车场"/>
                                <span id="admin">停车场 <span class="caret"></span></span>
                            </a>
                            <ul class="dropdown-menu dropdown-menu-right">
                                <li><a href="javascript:void(0)"><i class="mdi mdi-delete"></i> 清空缓存</a></li>
                                <li class="divider"></li>
                                <li><a href="login.html"><i class="mdi mdi-logout-variant"></i> 退出登录</a></li>
                            </ul>
                        </li>
                    </ul>
                </div>
            </nav>
        </header>
        <!--End 头部信息-->

        <!--页面主要内容-->
        <main class="lyear-layout-content">
            <div class="container-fluid">
                <div class="row">
                    <div class="col-lg-12">
                        <div class="card">
                            <div class="card-header">
                                <h4>用户列表</h4>
                            </div>
                            <div class="card-body">
                                    <div class="form-group">
                                        <input class="form-control" type="text" id="carId" name="carId" style="width: 20%;display: inline"
                                               placeholder="请输入车牌号">
                                        <button class="btn btn-default" id="btnlog" onclick="search(1)">查询</button>
                                        <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#newCreateModal" >新增用户</button>
                                    </div>

                                <div class="modal fade" id="newCreateModal" tabindex="-1" role="dialog"
                                     aria-labelledby="newCreateModalLabel">
                                    <div class="modal-dialog" role="document">
                                        <div class="modal-content">
                                            <div class="modal-header">
                                                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                                                    <span aria-hidden="true">&times;</span></button>
                                                <h4 class="modal-title" id="newCreateModalLabel">用户信息</h4>
                                            </div>
                                            <div class="modal-body">
                                                <form>
                                                    <div class="form-group">
                                                        <label for="newMemberName" class="control-label">用户姓名：</label>
                                                        <input type="text" class="form-control" id="newMemberName"
                                                               name="newMemberName" placeholder="请输入姓名">
                                                        <p style="color: red" id="p1"></p>
                                                    </div>
                                                    <div class="form-group">
                                                        <label for="newLicensePlate" class="control-label">车牌号：</label>
                                                        <input class="form-control" type="text" id="newLicensePlate"
                                                               name="newLicensePlate" placeholder="请输入车牌号">
                                                        <p style="color: red" id="p2"></p>
                                                    </div>
                                                    <div class="form-group">
                                                        <label for="newMemberPhone" class="control-label">手机号：</label>
                                                        <input type="text" class="form-control" id="newMemberPhone"
                                                               name="newMemberPhone" placeholder="请输入手机号">
                                                        <p style="color: red" id="p3"></p>
                                                    </div>
                                                    <div class="form-group">
                                                        <label for="newMemberBalance" class="control-label">充值金额（元）：</label>
                                                        <input class="form-control" type="text" id="newMemberBalance"
                                                               name="newMemberBalance" placeholder="请输入充值金额（整数）">
                                                        <p style="color: red" id="p4"></p>
                                                    </div>
                                                </form>
                                            </div>
                                            <div class="modal-footer">
                                                <button type="button" class="btn btn-default" data-dismiss="modal">关闭
                                                </button>
                                                <button type="button" class="btn btn-primary" onclick="newCreate()">确认
                                                </button>
                                            </div>
                                        </div>
                                    </div>
                                </div>

                                <br>
                                <div class="table-responsive">
                                    <table class="table table-hover" id="parking">
                                        <thead>
                                            <tr>
                                                <th width="10%">#</th>
                                                <th width="10%">姓名</th>
                                                <th width="15%">车牌号</th>
                                                <th width="20%">手机号</th>
                                                <th width="15%">余额</th>
                                                <th width="10%">是否为会员</th>
                                                <th width="20%">操作</th>
                                            </tr>
                                        </thead>
                                        <tbody>

                                        </tbody>
                                    </table>
                                </div>
                                <div id="pagemodel">
                                    <button type="button" onclick="first()" class="btn btn-default">首页</button>
                                    <button type="button" onclick="previous()" class="btn btn-default">上一页</button>
                                    <button type="button" onclick="next()" class="btn btn-default">下一页</button>
                                    <button type="button" onclick="last()" class="btn btn-default">尾页</button>
                                    <label id="showpage">当前第<a id="current"></a>页/总共<a id="total"></a>页</label>
                                </div>


                            </div>
                            <div class="modal fade" id="exampleModal" tabindex="-1" role="dialog"
                                 aria-labelledby="exampleModalLabel">
                                <div class="modal-dialog" role="document">
                                    <div class="modal-content">
                                        <div class="modal-header">
                                            <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                                                <span aria-hidden="true">&times;</span></button>
                                            <h4 class="modal-title" id="exampleModalLabel">用户充值</h4>
                                        </div>
                                        <div class="modal-body">
                                            <form>
                                                <div class="form-group">
                                                    <input type="hidden" id="uid" value="">
                                                    <input type="hidden" id="uname" value="">
                                                    <input type="hidden" id="ubalance" value="">
                                                    <input type="hidden" id="uamount" value="">
                                                    <input type="hidden" id="ustatus" value="">
                                                    <label for="lp" class="control-label">车牌号：</label>
                                                    <input type="text" class="form-control" id="lp" name="lp"
                                                           disabled="disabled">
                                                </div>
                                                <div class="form-group">
                                                    <label for="recharge" class="control-label">充值金额（元）：</label>
                                                    <input class="form-control" type="text" id="recharge"
                                                           name="recharge"
                                                           placeholder="输入充值金额">
                                                    <p style="color: red" id="p6"></p>
                                                </div>
                                            </form>
                                        </div>
                                        <div class="modal-footer">
                                            <button type="button" class="btn btn-default" data-dismiss="modal">关闭
                                            </button>
                                            <button type="button" class="btn btn-primary" onclick="recharge()">充值
                                            </button>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="modal fade" id="editModal" tabindex="-1" role="dialog"
                                 aria-labelledby="editModalLabel">
                                <div class="modal-dialog" role="document">
                                    <div class="modal-content">
                                        <div class="modal-header">
                                            <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                                                <span aria-hidden="true">&times;</span></button>
                                            <h4 class="modal-title" id="editModalLabel">用户信息</h4>
                                        </div>
                                        <div class="modal-body">
                                            <form>
                                                <div class="form-group">
                                                    <input type="hidden" id="uamount2" value="">
                                                    <input type="hidden" id="ustatus2" value="">
                                                    <label for="memberId" class="control-label">用户编号：</label>
                                                    <input type="text" class="form-control" id="memberId"
                                                           name="memberId" disabled="disabled">
                                                </div>
                                                <div class="form-group">
                                                    <label for="memberName" class="control-label">用户姓名：</label>
                                                    <input type="text" class="form-control" id="memberName"
                                                           name="memberName" disabled="disabled">
                                                </div>
                                                <div class="form-group">
                                                    <label for="licensePlate" class="control-label">车牌号：</label>
                                                    <input class="form-control" type="text" id="licensePlate"
                                                           name="licensePlate" disabled="disabled">
                                                </div>
                                                <div class="form-group">
                                                    <label for="memberPhone" class="control-label">手机号：</label>
                                                    <input type="text" class="form-control" id="memberPhone"
                                                           name="memberPhone">
                                                    <p style="color: red" id="p5"></p>
                                                </div>
                                                <div class="form-group">
                                                    <label for="memberBalance" class="control-label">余额（元）：</label>
                                                    <input class="form-control" type="text" id="memberBalance"
                                                           name="memberBalance" disabled="disabled">
                                                </div>
                                            </form>
                                        </div>
                                        <div class="modal-footer">
                                            <button type="button" class="btn btn-default" data-dismiss="modal">关闭
                                            </button>
                                            <button type="button" class="btn btn-primary" onclick="edit()">修改
                                            </button>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </main>
        <!--End 页面主要内容-->
    </div>
</div>

<script type="text/javascript" src="../static/js/member.js"></script>
<script type="text/javascript" src="../static/js/jquery.min.js"></script>
<script type="text/javascript" src="../static/js/bootstrap.min.js"></script>
<script type="text/javascript" src="../static/js/perfect-scrollbar.min.js"></script>
<script type="text/javascript" src="../static/js/main.min.js"></script>

</body>
</html>